#ifndef Server_H
#define Server_H

#include <QtCore/QObject>
#include <QtNetwork/QTcpServer>
#include <QList>
#include "tvservice.h"
#include <QRemoteSignal>

class Connection;

class Server : public QObject {
    Q_OBJECT
public:
    Server (quint32 port, QObject *parent = 0);
    virtual ~Server() {}

    qrs::TvService * service() const { return mService; }
signals:
    void clientConnected(QTcpSocket *socket);

private slots:
    void onNewConnection();

private:
    void connectSignals();
    QTcpServer *mTcpServer;
    qrs::TvService *mService;
    qrs::ServicesManager *mManager;
};

#endif
